#include "newdevicedialog.h"
#include "ui_newdevicedialog.h"

NewDeviceDialog::NewDeviceDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::NewDeviceDialog)
{
    ui->setupUi(this);

    InitDeviceName();
}

NewDeviceDialog::~NewDeviceDialog()
{
    delete ui;
}

void NewDeviceDialog::InitDeviceName(){
    ui->comboBoxDeviceName->addItem(QStringLiteral("RS232"));
    ui->comboBoxDeviceName->addItem(QStringLiteral("Ethernet"));
    ui->comboBoxDeviceName->addItem(QStringLiteral("JakaRobot"));
    ui->comboBoxDeviceName->addItem(QStringLiteral("VirtualDevice"));
    ui->comboBoxDeviceName->setCurrentIndex(0);

    m_strDeviceName = QStringLiteral("RS232");
}

void NewDeviceDialog::on_comboBoxDeviceName_currentIndexChanged(int index)
{
    m_strDeviceName = ui->comboBoxDeviceName->currentText();
}

